<template>
  <a-pagination
    v-model="current"
    :page-size-options="pageSizeOptions"
    :total="total"
    show-size-changer
    :page-size="pageSize"
    @showSizeChange="onShowSizeChange"
  >
    <template slot="buildOptionText" slot-scope="props">
      <span v-if="props.value !== '50'">{{ props.value }}条/页</span>
      <span v-if="props.value === '50'">全部</span>
    </template>
  </a-pagination>
</template>
<script>
export default {
  props: {
    pageSizeOptions: {
      type: Array,
      default: () => {
        return ["10", "20", "30", "40", "50"];
      },
    },
    current: {
      type: Number,
      required:true,
    },
    total: {
      type: Number,
      default:0
    },
    pageSize: {
      type: Number,
      default:10
    },
  },
  data() {
    return {
    
    };
  },
  methods: {
    onShowSizeChange(current, pageSize) {
        console.log(current, pageSize)
    //   this.pageSize = pageSize;
    },
  },
};
</script>
